-- starting - "Corin walks to his home"

-- /*
-- {
-- P_SKIPINTRO: Whether to show the entire starting again
--   (0) Show the entire starting
--   (1) Do not show everything
-- }
-- */

function autoexec()
 set_desc(0)
  return
end


function entity_handler(en)
  return
end


function postexec()
  LOC_storyline(CORIN)

end


function zone_handler(zn)
  return
end




function LOC_storyline(en)

   if (en == CORIN) then
    set_ent_facing(HERO1, FACE_LEFT)
    warp("enter_corin", 4)
    set_ent_speed(HERO1, 4)
    set_ent_script(HERO1, "R27")

    wait_for_entity(7, HERO1)
    set_ent_facing(7, FACE_LEFT)
    bubble(7, "Get away from the gates rifraff!")
    set_ent_facing(7, FACE_DOWN)
    set_ent_speed(HERO1, 5)
    set_ent_script(HERO1, "D3")
    wait(75)    
    set_ent_facing(HERO1, FACE_UP)
    
    --wait_for_entity(HERO1, HERO1)
    wait(75)    
    set_ent_speed(HERO1, 4)
    thought(HERO1, "one day... one day...")
    set_ent_script(HERO1, "R2D13L1D1L8D7R5U1")
    wait_for_entity(HERO1, HERO1)
    change_map("townx", "home_enter")

  end


   set_autoparty(0)
   remove_chr(en)

  return
end
